package com.cci.kangdao.dao;

import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;
import java.util.Map;

/**
 * @description:
 * @author: shiliqiang
 * @company: CTY Technology Co.,Ltd
 * @since: 2021/7/23 13:51
 * @version: V1.0
 */
@MapperScan
public interface FaultDao {
     /**
      * @description: 批量插入
      * @param:
      * @return:
      * @exception:
      * @author: shiliqiang
      * @company: CTY Technology Co.,Ltd
      * @since: 2021/7/23 16:35
      * @version: V1.0
      */
    int insertFault(@Param("list")List list, @Param("orderId") Long orderId, @Param("nowTime") String nowTime, @Param("userId") Long userId);

     /**
      * @description: 更新故障信息为删除标识
      * @param:
      * @return:
      * @exception:
      * @author: shiliqiang
      * @company: CTY Technology Co.,Ltd
      * @since: 2021/8/1 14:57
      * @version: V1.0
      */
    //int updateFault(@Param("flag")Integer flag, @Param("orderId") Long orderId, @Param("faultId") String faultId);
    int updateFault(Map<String, Object> map);

    /**
      * @description: 查询故障数据
      * @param:
      * @return:
      * @exception:
      * @author: shiliqiang
      * @company: CTY Technology Co.,Ltd
      * @since: 2021/7/23 16:36
      * @version: V1.0
      */
    List<JSONObject> getFaults(@Param("orderId") Long orderId);
}
